<!-- 出库订单详情 -->
<template>
  <div class="page-container" v-loading="loading" v-loadingCommonStyle>
    <ex_header_spiler :title="$t('label_base_info')" />
    <ex_super_desc :model="baseModel" :data="form" size="default" direction="vertical" :attrs="$defaultDetailDescAttrs" border
      class="desc_flex_row" labelClassName="flex_cell" contentClassName="flex_cell">
    </ex_super_desc>
    <ex_header_spiler :title="$t('label_photo_attachment')" />
    <div class="imgs">
      <!-- <el-image v-for="item in arr" key="item" :src="item" :previewSrcList="arr" fit='contain' style="width: 200px; height: 200px;margin-right: 10px; margin-bottom: 10px;"></el-image> -->
      <ex_image_view v-if="form.receiptImageUrl" :src="form.receiptImageUrl" :preview-src-list="[form.receiptImageUrl]"
        class="image" style="width: 10rem;height: 10rem;" />
    </div>


  </div>
</template>
<script>
import router_params from '@/mixin/router_params';

export default {
  title: "label_tms_waybill_order_view",
  mixins: [router_params],
  components: {},
  data() {
    return {
      loading: false,
      form: {},
      baseModel: [
        { key: 'orderCode', label: 'label_tms_receipt_order_platform_number', },
        { key: 'trackNumber', label: 'label_tms_receipt_shipping_order_number', },
        // { key: 'waybillCode', label: 'label_tms_receipt_task_number', },
        { key: 'tmsReceiptStatusEnum', label: 'label_receipt_order_status', formatter: (r, c, v) => this.$enumShow(v, "TmsReceiptStatusEnum") },
        { key: 'deliveryCityName', label: 'label_tms_receipt_commence_address', },
        { key: 'receiptCityName', label: 'label_tms_receipt_destination', },
        { key: 'receiptUserName', label: 'label_tms_track_consignee', },
        { key: 'receiptContacts', label: 'label_tms_track_consignee_phone', },
        { key: 'orderFinishTime', label: 'label_receipt_sign_time', formatter: (r, c, v, i) => this.$dateFormat(v) },
        { key: 'recoveryTime', label: 'label_receipt_recycle_time', formatter: (r, c, v, i) => this.$dateFormat(v) },
        { key: 'handoverTime', label: 'label_tms_receipt_receipt_handover_time', formatter: (r, c, v, i) => this.$dateFormat(v) },
        { key: 'signTime', label: 'label_confirm_time', formatter: (r, c, v, i) => this.$dateFormat(v) },
        {}
      ]
    };
  },

  computed: {

  },

  methods: {
    init_data_default(into_params) {
      this.$emit("tagModifyLabel", {
        _key: 'label_name_code', name: this.$tt("label_receipt_detail"),
        code: into_params.id || ""
      })

      if (into_params.id) {
        this.loading = true
        this.$ajax({
          url: "/tms-api/task/TmsOrderReceiptInfoRpc/detail.json",
          method: 'post',
          data: { id: into_params.id },
          success: (res) => {
            this.loading = false
            this.form = Object.assign({}, res.data)
          }
        })
      }
    },

  }
};

</script>
<style></style>
